import type { ChangeEventHandler } from 'react';
import './index.scoped.less';

interface IMInputProps {
  title: string;
  value: string;
  onChange: ChangeEventHandler<HTMLInputElement>;
}

function MInput({ title, value, onChange }: IMInputProps) {
  return (
    <div id="m-input-container">
      <input className="input" value={value} onChange={onChange} />
      <span className="title">{title}</span>
      <div className="line"></div>
    </div>
  );
}

export default MInput;
